package com.df.ez_game.server;

public class EzGameBusinessException extends RuntimeException{
    private Integer code;
    EzGameBusinessException(Integer code,String reason){
        super(reason);
        this.code = code;
    }
    public static EzGameBusinessException create(Integer code,String reason){
        if(code==null || reason==null){
            throw new RuntimeException("code 或者 reason 不能为null");
        }
        return new EzGameBusinessException(code,reason  );
    }

    public Integer getCode(){
        return code;
    }
}
